VistaDB 6
VistaDB.Web Namespace / VistaDBMembershipProvider Class / EncryptPassword Method / EncryptPassword(Byte[],MembershipPasswordCompatibilityMode) Method
A byte array that contains the password to encrypt.
The membership password-compatibility mode.


In This Topic
    EncryptPassword(Byte[],MembershipPasswordCompatibilityMode) Method
    In This Topic
    Encrypts the specified password using the specified password-compatibility mode.
    Syntax
    'Declaration
     
    
    Protected Overloads Function EncryptPassword( _
       ByVal password() As System.Byte, _
       ByVal legacyPasswordCompatibilityMode As System.Web.Configuration.MembershipPasswordCompatibilityMode _
    ) As System.Byte()
    'Usage
     
    
    Dim instance As VistaDBMembershipProvider
    Dim password() As System.Byte
    Dim legacyPasswordCompatibilityMode As System.Web.Configuration.MembershipPasswordCompatibilityMode
    Dim value() As System.Byte
     
    value = instance.EncryptPassword(password, legacyPasswordCompatibilityMode)
    protected System.byte[] EncryptPassword( 
       System.byte[] password,
       System.Web.Configuration.MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode
    )

    Parameters

    password
    A byte array that contains the password to encrypt.
    legacyPasswordCompatibilityMode
    The membership password-compatibility mode.

    Return Value

    A byte array that contains the encrypted password.
    Exceptions
    ExceptionDescription
    The System.Web.Configuration.MachineKeySection.ValidationKey property or System.Web.Configuration.MachineKeySection.DecryptionKey property is set to AutoGenerate.
    This method is not available. This can occur if the application targets the .NET Framework 4 Client Profile. To prevent this exception, override the method, or change the application to target the full version of the .NET Framework.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also